home *** CD-ROM | disk | FTP | other *** search
- Path: news.jmu.edu!warrenrk
- From: warrenrk@falcon.jmu.edu (Rachel K. Warren)
- Newsgroups: comp.lang.c
- Subject: Adding Arrays, anyone?
- Date: 24 Jan 1996 23:53:26 GMT
- Organization: James Madison University, Harrisonburg, VA
- Sender: warrenrk@jmu.edu
- Message-ID: <4e6gpm$dfb@doc.jmu.edu>
- NNTP-Posting-Host: falcon.jmu.edu
- X-Newsreader: TIN [version 1.2 PL2 JMU4]
-
- Could somebody give me an example of adding two arrays together?
- Say the first array has four mailboxes with "1" in it to, so when you
- print it out its,"1111" and the second array has four mailboxes with the
- number "2" in it, so that you print it out and its "2222", so I could get
- "3333"?
-
-
- I tried something like
-
- for(counter =0 ; counter != '\0'; counter++)
- printf("%c",string1[counter] + string2[counter]
-
- and I got a bunch of garbage on the screen.
-
-
-